package com.josework.springhelloworld.controller;

import com.josework.springhelloworld.AjaxResponse;
import com.josework.springhelloworld.base.BaseResponse;

public class BaseController {

    public BaseController() {
    }

    protected BaseResponse ok() {
        return new BaseResponse();
    }

    protected <T> BaseResponse<T> ok(T data) {
        return new BaseResponse(data);
    }

    protected BaseResponse fail(String errMessage) {
        return new BaseResponse(405, errMessage);
    }
}
